/**
 * 
 */
package org.al.poc.persistence.dao;

import java.util.List;

import javax.persistence.Query;

import org.al.poc.persistence.beans.Order;

/**
 * @author jerome, bilal
 *
 */
public class DaoOrderJpa extends DaoJpa<Order, Integer> implements DaoOrder {


	@SuppressWarnings("unchecked")
	public List<Order> getAll() throws DaoException {
		try {
			String texteQuery =	"select c from ORDRE as c";
			Query query = getEntityManager().createQuery(texteQuery);
			return (List<Order>)query.getResultList();
		} 
		catch (Exception e) {
			throw new DaoException (e.getMessage(), e.getCause());
		}
	}

}
